home *** CD-ROM | disk | FTP | other *** search
Text File | 1989-04-25 | 3.1 KB | 103 lines | [TEXT/MPS ] |
- {Copyright © 1988 by Charles F. McMath All rights reserved.}
-
- UNIT UQPlot;
-
- INTERFACE
-
- USES
- { • MacApp - this includes all of the things necessary from the MacApp Library }
- UMacApp,
-
- { • Building Blocks }
- UDialog, UPrinting,
-
- { • Implementation Use }
- SANE, ToolUtils, Fonts, Resources, Script, PickerIntf, Packages;
-
-
- CONST
-
- kSignature = 'FGT3'; {Application signature}
- kFileType = 'PICT'; {our filetype }
- kQPlotWindowID = 1001;
-
- TYPE
-
- TQPlotApplication = OBJECT(TApplication)
- fDefGraph: INTEGER; { Graph color index }
- fDefAxis: INTEGER; { Axis color index }
- fDefBack: INTEGER; { Background color index }
- fPrintOpt: INTEGER; { Page/Window size }
-
- PROCEDURE TQPlotApplication.IQPlotApplication(
- itsMainFileType: OSType);
- FUNCTION TQPlotApplication.DoMakeDocument(
- itsCmdNumber: CmdNumber): TDocument; OVERRIDE;
- PROCEDURE TQPlotApplication.HandleFinderRequest; OVERRIDE;
- PROCEDURE TQPlotApplication.DoSetupMenus; OVERRIDE;
- FUNCTION TQPlotApplication.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
- PROCEDURE TQPlotApplication.ShowAboutApp;
- END;
-
-
- TQPlotDocument = OBJECT(TDocument)
- fAParam: Real; { these parameters }
- fBParam: Real; { correspond to those }
- fCParam: Real; { in the quadratic }
- fStep: Real; { equation. }
- fXScale: INTEGER; { X axis scale }
- fYScale: INTEGER; { Y axis scale }
-
- fResult: INTEGER; { real results? }
- fRoot1: REAL; { first root }
- fRoot2: REAL; { second root }
-
- fPlotView: TQPlotView;
-
-
- PROCEDURE TQPlotDocument.IQPlotDocument(itsFileType, itsCreator: OSType;
- usesDataFork, usesRsrcFork: BOOLEAN;
- keepsDataOpen, keepsRsrcOpen: BOOLEAN);
- PROCEDURE TQPlotDocument.DoMakeWindows; OVERRIDE;
- PROCEDURE TQPlotDocument.DoMakeViews(forPrinting: BOOLEAN); OVERRIDE;
-
- PROCEDURE TQPlotDocument.PosePlotDialog;
- PROCEDURE TQPlotDocument.Quad(a, b, c : REAL;VAR x1, x2 : REAL;
- VAR result : INTEGER);
- FUNCTION TQPlotDocument.SolveIt(a, b, c: REAL; VAR x1, x2: REAL): INTEGER;
-
- PROCEDURE TQPlotDocument.DoNeedDiskSpace(VAR dataForkBytes,
- rsrcForkBytes: LONGINT); OVERRIDE;
- PROCEDURE TQPlotDocument.DoWrite(aRefNum: INTEGER; makingCopy: BOOLEAN); OVERRIDE;
- END;
-
-
- TQPlotView = OBJECT(TView)
- fPlotDoc: TQPlotDocument; { link to the doc }
- fOnePage: BOOLEAN; { if TRUE, constrain to page size }
- fDrawing: PicHandle; { our picture! }
-
- PROCEDURE TQPlotView.IQPlotView(theDoc: TQPlotDocument; theGrafColor,
- theAxisColor, theBackColor: INTEGER);
- PROCEDURE TQPlotView.Free; OVERRIDE;
-
- PROCEDURE TQPlotView.CalcMinSize(VAR minSize: VPoint); OVERRIDE;
- PROCEDURE TQPlotView.DoSetupMenus; OVERRIDE;
- FUNCTION TQPlotView.DoMenuCommand(aCmdNumber: CmdNumber): TCommand; OVERRIDE;
-
- PROCEDURE TQPlotView.PrQDStuff(pRect : rect; QDdevice : integer);
- PROCEDURE TQPlotView.SuperViewChangedSize (delta: VPoint;
- invalidate: BOOLEAN); OVERRIDE;
- PROCEDURE TQPlotView.Resize (width, height: VCoordinate;
- invalidate: BOOLEAN); OVERRIDE;
- PROCEDURE TQPlotView.Draw(area: Rect); OVERRIDE;
- END;
-
-
- IMPLEMENTATION
-
- {$I UQPlot.inc1.p}
-
- END.
-
-